//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_getrandomrangeint.sqf"
#include "x_setup.sqf"

// gets a random integer number in a specific range
// parameters: integer from, integer to (second number must be greater than first)
// example: _random_integer = [30,150] call FUNC(GetRandomRangeInt);
private ["_num1","_num2","_ra"];
PARAMS_2(_num1,_num2);
if (_num1 > _num2) then {_num1 = _this select 1;_num2 = _this select 0};
_ra = _num2 - _num1;
_ra = _ra call FUNC(RandomFloor);
(_num1 + _ra)